from django.http import HttpResponseRedirect
from django.utils.html import escape
from google.appengine.api import users
from models import Greeting

def sign(request):

    greeting = Greeting()

    if users.get_current_user():
      greeting.author = users.get_current_user()

    greeting.content = request.POST['content']
    greeting.put()
    
    return HttpResponseRedirect('/')
